package Service.Serviceimpl;

import Dao.Daoimpl.Manageimpl;
import Dao.Manage;
import Pojo.Msgpojo;
import Pojo.User;
import Pojo.UserMsgpojo;
import Service.ManageService;

import java.util.List;

public class Manageserviceimpl implements ManageService {
    @Override
    public List<User> getusermanage() {
        Dao.Daoimpl.Manageimpl manageimpl = new Dao.Daoimpl.Manageimpl();
        return manageimpl.getUserManage();
    }

    @Override
    public boolean addUserManage(User user) {
        Dao.Daoimpl.Manageimpl manageimpl = new Dao.Daoimpl.Manageimpl();
        return manageimpl.addUserManage(user);
    }

    @Override
    public boolean updateUserManage(User user) {

        return new Dao.Daoimpl.Manageimpl().updateManage(user);
    }

    @Override
    public boolean delUserManage(int id) {
        return new Dao.Daoimpl.Manageimpl().delUserManage(id);
    }
    //以上是用户账号密码信息表的增删改查
//    下面是管理者的公告增删改

    //    改
    @Override
    public boolean updatemsg(Msgpojo msgpojo) {
        return new Manageimpl().updatemsg(msgpojo);
    }
//删
    @Override
    public boolean delmsg(int id) {
        return new Manageimpl().delmsg(id);
    }
    //添加
    @Override
    public boolean addmsgmanage(Msgpojo msgpojo) {
        return new Manageimpl().addMsgManage(msgpojo);
    }


//用户信息表
    //获取
    @Override
    public List<UserMsgpojo> getUserMsgpojo() {
        return new Manageimpl().getUserMsgpojo();
    }
    //    用户信息的增删改
//    删
    @Override
    public boolean delusermsg(int id) {
        return new Manageimpl().delusermsg(id);
    }

//改
    @Override
    public boolean updateusermsg(UserMsgpojo userMsgpojo) {
        return new Manageimpl().updateusermsg(userMsgpojo);
    }




}
